package com.kx.kxblog.controller;

import com.kx.kxblog.annotation.PermissionLimit;
import com.kx.kxblog.entity.Category;
import com.kx.kxblog.entity.Site;
import com.kx.kxblog.service.CategoryService;
import com.kx.kxblog.service.SiteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;
import java.util.Collection;

@Api(tags = "分类")
@RequestMapping("/category")
@RestController
public class CategoryController extends AbstractController<Category, Integer, CategoryService> {
    @PermissionLimit
    @GetMapping("/my")
    @ApiOperation(value="获取我的分类")
    public Collection<Category> my(){
        return service.my();
    }
}
